package com.example.login.service;

import com.example.login.entity.User;
import com.example.login.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class UserService {
    @Autowired
    UserMapper userMapper;

    @Transactional
    public User loginByNameAndPwd(String name, String pwd) {
        return userMapper.getUserByNameAndPwd(name, pwd);
    }
}
